#include "complex.h"

Complex::Complex(int aReal /* = 0 */, int aImage /* = 0 */)
{
	m_iReal = aReal;
	m_iImage = aImage;
}

Complex::~Complex()
{

}

//#相加
Complex Complex::add(const Complex & aCom) const
{
	return Complex(m_iReal + aCom.m_iReal,m_iImage + aCom.m_iImage);
}

//#相减
Complex Complex::div(const Complex & aCom) const
{
	return Complex(m_iReal - aCom.m_iReal,m_iImage - aCom.m_iImage);
}

//#相乘
Complex Complex::mul(const Complex & aCom) const
{
	return Complex(m_iReal * aCom.m_iReal,m_iImage * aCom.m_iImage);
}

int Complex::getReal() const
{
	return m_iReal;
}

int Complex::getImage() const
{
	return m_iImage;
}
